﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace UnitControls {
    /// <summary>
    /// Interaction logic for LengthInput.xaml
    /// </summary>
    public partial class AreaInput : UserControl {
        public event EventHandler OnChange {
            add { myInput.OnChange += value; }
            remove { myInput.OnChange -= value; }
        }

        [Category( "Common" )]
        public int selectedUnit {
            get { return myInput.selectedUnit; }
            set { myInput.selectedUnit = value; }
        }

        [Category( "Common" )]
        public double Value {
            get { return myInput.Value; }
            set { myInput.Value = value; }
        }

        public AreaInput() {
            InitializeComponent();
            myInput.freeze = false;
            myInput.UpdateTextBox();
        }
    }
}
